#pragma once

#include <iostream>
#include <fstream>
#include "PlatTypeUtil.h"
#include <vector>
#include "StringUtil.h"
#include "../Render/VulkanRHI.h"


class FileUtil
{
public:

	static void Init();

	static std::string GetExePath();

	static std::string GetAppPath();

	static std::string GetRootPath();

	static std::string GetAssetPath();

	static bool LoadFileToArray(std::vector<uint8>& result, const std::string& filename);

	static bool LoadFileToString(std::string& result, const std::string& filename);

	static bool LoadFileToString(std::wstring& result, const std::string& filename);

	static bool SaveArrayToFile(std::vector<uint8>& buffer, const std::string& filename);
	
	//static bool SaveStringToFile(std::string str, const std::string& filename);
	
	//static bool SaveStringToFile(std::wstring str, const std::string& filename);

	static bool DeleteFile(const std::string& filename);

	static void LoadTextureToArray(const std::string& filename, VkFormat format, std::vector<uint8>& result, uint32& width, uint32& height);

	static void ProcessCommand(const std::string& commandStr);

protected:

	static std::string sExePath;

	static std::string sAppPath;

	static std::string sRootPath;

	static std::string sAssetPath;

};